package arrayPractice;

public class Class283 {

    public void moveZeroes(int[] nums) {

        int fast=0;
        int slow=0;

        while (fast< nums.length){
            if (nums[fast]!=0){
                nums[slow]=nums[fast];
                slow++;
            }
            fast++;
        }

        while (slow< nums.length){
            nums[slow]=0;
            slow++;
        }


    }

    public static void main(String[] args) {
        Class283 class283 = new Class283();
        int[]  arr={0,1,0,3,12};
        class283.moveZeroes(arr);
        for (int a: arr
             ) {
            System.out.println(a);

        }
    }
}
